home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir38
/
cpx220.zip
/
CPX.DOC
next >
Wrap
Text File
|
1993-10-27
|
48KB
|
996 lines
╒═══════════════════════════════════════════╕
│ CPx │
│ Revision 2.20.0 │
│ │
│ Copyright (C) 1989-1993 FM de Monasterio │
│ All Rights Reserved │
│ Licensed Material │
╘═══════════════════════════════════════════╛
CONTENTS
1. SUMMARY
2. REGISTRATION
3. GENERAL INFORMATION
4. INSTALLATION & USAGE
5. INSTALLATION IN UPPER MEMORY
6. TECHNICAL INFORMATION
7. OPERATION REQUIREMENTS & CONFLICTS
8. COPYRIGHT & LICENSE INFORMATION
9. DISTRIBUTION & WARRANTY
1. SUMMARY
The blinking cursor displayed in text modes is directly controlled by the
video hardware, and there is no provision to allow software to modify the
blinking rate.
CPx is a memory-resident program for controlling the shape of the cursor,
including the display of a non-blinking cursor. The user can specify: (i)
the shape of the blinking cursor, from thin underline to full block, (ii)
whether such cursor is to be displayed, and (iii) whether a non-blinking,
full-block, see-through cursor is to be displayed. The blinking and non-
blinking cursors can be displayed independently or simultaneously.
The resident can be turned on and off with a user-specifiable hotkey, and
changed on the fly by executing the program with new switches simply from
the DOS prompt (or a batch file) or via the DOS enviroment. The resident
becomes inactive in BIOS or VESA graphics modes; it also becomes inactive
if WINDOWS 3 (Standard or 386-Enhanced mode) were started and then active
again once DOS operations are resumed.
The operation of CPx can be made quiescent via switch QU, i.e. it remains
resident but not active, until its reactivation by a subsequent execution
of the program or removed from memory.
The resident occupies about 0.5 KB of memory. The program can load itself
directly in the upper memory (UMB), either via an extended memory manager
supporting XMS 2+ services or via MS-DOS 5+ (if UMB-linked); the user can
specify a minimum UMB address to select or avoid a given UMB region. CPx
program needs MS-DOS version 2 or later (or compatible operating system),
and an IBM-compatible SVGA/VGA, EGA, MCGA/CGA, or MDA adapter or HERCULES
cards.
For a description of what is new with the current version, see CPX.NEW.
2. REGISTRATION
This software is user-supported; the present release, although lacking the
options marked by asterisks, is a fully usable program. You may test this
release for (in)compatibilities with your system, but after the testing is
completed you are requested to order a registered copy of the full release
of the software from the address at the end of this documentation.
If you would rather use this unregistered copy, consider making a donation
to the Children's Hospital of Washington DC, for indigent children in need
of medical care. Every year in the USA, infant mortality claims the lives
of tens of thousands of children before their first year of life, and most
of them come from families below poverty level... Please send to the same
address a check payable to the "PATIENT CARE FUND, CHILDREN'S HOSPITAL" on
the obverse, and marked "For Deposit Only" on the reverse. Donations will
be sent to Children's Hospital. Please identify the program for which you
are making the donation.
------------------------------------------------------------------
CPX.REG contains a form needed to register or upgrade the Software
------------------------------------------------------------------
See the final part of this documentation for information on the Licensing,
Distribution, and Limited Warranty of this software.
3. GENERAL INFORMATION
A terminate-and-stay resident is a program that, after it execution ends,
remains in memory until the machine is rebooted or it removes itself from
memory (if the program has such capability).
CPx is a resident that permits control of the shape and visibility of the
blinking cursor displayed during text modes, and even its substitution by
a non-blinking, see-through, full-block cursor. The cursor customization
is maintained in all (BIOS and standard VESA) text video modes and can be
toggled on or off by pressing a hotkey combination.
The resident becomes inactive in graphics modes; it also becomes inactive
if WINDOWS (Standard or 386-Enhanced mode) were started, and active again
once DOS operations are resumed.
This program can be executed repeatedly to modify its parameters, without
resulting in multiple copies to memory; its resident uses about 0.5 KB of
memory. The program command switches can be selected from the DOS command
line or with the DOS environment variable 'CPX=' (see below).
SHAPE/VISIBILITY MODULATION (HARDWARE CURSOR)
The CRT controller (CRTC) is a programmable hardware component of the IBM
PC and PS/2 video systems. The Motorola 6845 chip is present in MDA, CGA,
and HGC cards, and a 6845-compatible CRTC is a custom LSI chip in the EGA,
part of the Memory Controller Gate Array on the MCGA, or part of the Video
Graphics Array on the VGA. One CRTC function is to implement the type and
position of the hardware cursor in text (i.e., alphanumeric) video modes.
Cursor shape can be set either via the ROM BIOS, through interrupt 10h, or
via direct commands to the CRTC. The later approach, which is much faster
than the former, is used by CPx due to speed requirements since the cursor
shape has to be enforced between the system timer ticks, which occur every
55 milliseconds. Direct CRTC access requires full hardware compatibility.
Program execution is aborted if a test for (Motorola 6845-compatible) CRTC
compatibility fails or if the video adapter cannot be identified.
The type of the hardware cursor is specified by loading two CRTC registers
with values corresponding to the top and bottom lines of the cursor within
the current character matrix (which hereafter are referred to as 'top' and
'end' line), Due to video hardware differences, the rules that govern the
the resulting shape vary with the adapter card. In the following examples
these variations are illustrated for different top and end lines, assuming
for simplicity an 8-line height (8x8) character matrix from a to h:
CGA EGA VGA CGA EGA VGA
T=g ┌───────┬───────┬───────┐ T=f ┌───────┬───────┬───────┐
E=g a│·······│·······│·······│ E=d a│·······│▒▒▒▒▒▒▒│·······│
b│·······│·······│·······│ b│·······│▒▒▒▒▒▒▒│·······│
c│·······│·······│·······│ c│·······│▒▒▒▒▒▒▒│·······│
d│·······│·······│·······│ d│▒▒▒▒▒▒▒│·······│·······│
e│·······│·······│·······│ e│▒▒▒▒▒▒▒│·······│·······│
f│·······│·······│·······│ f│▒▒▒▒▒▒▒│▒▒▒▒▒▒▒│·······│
g│▒▒▒▒▒▒▒│▒▒▒▒▒▒▒│▒▒▒▒▒▒▒│ g│·······│▒▒▒▒▒▒▒│·······│
h│·······│·······│·······│ h│·······│▒▒▒▒▒▒▒│·······│
└───────┴───────┴───────┘ └───────┴───────┴───────┘
CGA EGA VGA CGA EGA VGA
T=e ┌───────┬───────┬───────┐ T=d ┌───────┬───────┬───────┐
E=h a│·······│·······│·······│ E=i a│▒▒▒▒▒▒▒│▒▒▒▒▒▒▒│·······│
b│·······│·······│·······│ b│·······│▒▒▒▒▒▒▒│·······│
c│·······│·······│·······│ c│·······│▒▒▒▒▒▒▒│·······│
d│·······│·······│·······│ d│▒▒▒▒▒▒▒│▒▒▒▒▒▒▒│▒▒▒▒▒▒▒│
e│▒▒▒▒▒▒▒│▒▒▒▒▒▒▒│▒▒▒▒▒▒▒│ e│▒▒▒▒▒▒▒│▒▒▒▒▒▒▒│▒▒▒▒▒▒▒│
f│▒▒▒▒▒▒▒│▒▒▒▒▒▒▒│▒▒▒▒▒▒▒│ f│▒▒▒▒▒▒▒│▒▒▒▒▒▒▒│▒▒▒▒▒▒▒│
g│▒▒▒▒▒▒▒│▒▒▒▒▒▒▒│▒▒▒▒▒▒▒│ g│▒▒▒▒▒▒▒│▒▒▒▒▒▒▒│▒▒▒▒▒▒▒│
h│▒▒▒▒▒▒▒│·······│▒▒▒▒▒▒▒│ h│▒▒▒▒▒▒▒│▒▒▒▒▒▒▒│▒▒▒▒▒▒▒│
└───────┴───────┴───────┘ └───────┴───────┴───────┘
Because of these differences, and as it is done in other cursor utilities,
the cursor top and end line can be read (and set) from a coordinate matrix
display in the Syntax/Status panel brought by switch /? (see below).
By selecting specific top and end line values, it is also possible to make
the cursor invisible in most video adapters. Although cursor visibility is
only a special case of shape modulation, it is controlled independently of
other modulated shapes.
NON-BLINKING, FULL-BLOCK, SEE-THROUGH CURSOR (PSEUDOCURSOR)
The blinking of the cursor cannot be eliminated by video BIOS calls nor by
direct CRTC commands. CPx provides a non-blinking, full-block pseudocursor
to replace the hardware cursor (switch BL). This steady pseudocursor works
smoothly either at the DOS prompt or within a text-mode application (e.g.,
word processors) in a manner similar to the standard mouse pointer in text
modes.
The character under the pseudocursor appears with complementary foreground
/background attributes. This allows for its easy visualization especially
when word-processor codes are color coded, except in those cases when both
the foreground and the background have the same color (i.e., intense green
text on a darker green background) or the user suffers from a color vision
deficit. In such a case, a very thin blinking cursor can be combined with
the pseudocursor in a nonobtrusive manner to permit visualization.
CPU VERSIONS
The program is written in assembly language; each version consists of four
processor-type releases (086, 268, 386 and 486) in which the code has been
optimized for the CPU types of the 80x86 processor family. This is needed
since the x86 processors differ markedly in instruction execution time and
the incorporation of a memory cache in some CPU types affects such time by
influencing the speed of instruction fetching and of memory access. A 486
release should be used with a 586 CPU (Pentium) to minimize degradation of
performance vis-á-vis code alignment.
In addition to standard (086) assembly language instructions, the 286, 386
and 486 releases of the program also use 286-, 386- or 486-specific opcode
instructions in "real" mode (which is the native mode for 086 processors).
The type and degree of code optimization vary with the CPU type, and yield
relatively small differences in the resident size, which is less than 1000
bytes.
OPERATION REQUIREMENTS
The program requires MS-DOS version 2 or later (or compatible DOS system)
and an IBM-compatible SVGA, VGA, EGA, MCGA/CGA, or MDA video adapter or a
HERCULES video card. With old CGA adapters, CPx produces a little bit of
video interference ('snow').
SAFETY MEASURES
Each time it is executed, the program verifies its code integrity through
a number of cyclic redundancy checks (CRCs). Program execution is aborted
if any check were to fail as such a failure indicates code corruption and
the program should not be used for your own protection.
The executable program is distributed as a fully encrypted and compressed
EXE-type file in order to reduce the possibility of code tampering.
NOTE --------------------------------------------------------------------
Because both encryption and compression change the code sequences to
different values, it cannot be excluded that these processess might,
by chance, yield an encrypted data sequence which triggers a warning
from antiviral utilities that merely check disk-stored files against
a list of code 'signatures' or instructions. Though all distribution
diskettes are scanned with one such utility to avoid the possibility
of spurious warnings, the changing nature of these 'signature' lists
makes this exclusion difficult.
If using these utilities, check the registered distribution diskette
before installing the programs in your hard disk, and please contact
the vendor (see below) if a spurious warning were triggered.
--------------------------------------------------------------------
4. INSTALLATION & USAGE
In the descriptions below, {} enclose context variables, e.g., the number
{n}, whereas <> enclose alphanumeric characters or keys, e.g., the letter
<n>.
The enclosed utility INSTALL.EXE may be used to copy the program files to
a user-defined drive and directory, and--if so desired--to add statements
to the file AUTOEXEC.BAT so that the program is loaded automatically upon
booting and to append the user-defined directory to the PATH statement.
MANUAL INSTALLATION
Alternatively, to install the program manually, add the command
{path}CPX [/SWITCH1 ... /SWITCHn] [;comments]
to the AUTOEXEC.BAT file, if you wish to have the program installed after
booting the system, or simply enter this command from the DOS prompt when
you want to use the program. If given, {path} must specify the drive and
subdirectory for the file CPX.EXE.
Square brackets enclose optional command arguments; [/SWITCH1.../SWITCHn]
are program command switches, whereas [;comments] are comments that might
be useful to clarify batch file usage.
If executed with a null argument (i.e., switches were not specified), the
program searches the DOS environment block for a variable with the format
CPX=/SWITCH1 ... /SWITCHn, to use these switches as program commands (see
switch /EV below).
If the execution command has null arguments, an environment variable does
not exist, and the resident is not yet installed, then the default (i.e.,
preselected) configuration is used for the installation. If the resident
is already installed, and an environment variable does not exist, a null-
argument command has no other effects than updating the resident in terms
of the video system. The default cases of the various switches are given
below.
Once installed, the resident can be modified at any time by executing the
program with new parameters. If other memory-resident programs were also
used, make sure all residents installed are 'well behaved' and pass along
the necessary interrupt data (see 'OPERATION REQUIREMENTS & CONFLICTS').
COMMAND SWITCHES
These switches allow for the modification of the default (preselected) or
of an already selected resident configuration, or the execution of one of
the non-resident services provided by the program (e.g. display of a Help
panel, adjustment of display brightness, etc).
The switches can be specified in any order, and they must be separated by
a space, tab, comma, or slash; a dash preceded by space may also be used.
They are not case sensitive, e.g., /EV = /Ev = /eV = /ev. Invalid switch
specifications may result in an error message or in program cancellation.
Some switches have preset ('default') values which are used if new values
were not specified.
The following command switches are recognized:
SWITCH ?
~~~~~~~~
This switch displays the Status/Usage/Help panels, which are described in
more detail in the section below. If a VGA or EGA is the active adapter,
the program saves the contents of the palette registers prior to changing
the attributes for its displays. (See 'STATUS/USAGE/HELP PANELS' below.)
EGA users: The default MS-DOS palette attributes are restored if the EGA
BIOS fails to store data in the Parameter Save Area. Old EGAs
may store invalid data in this area, resulting in an improper
restoration of the video attributes (use the DOS command MODE
CO80 to restore the default attributes).
SWITCH /?H
~~~~~~~~~~
The modulation of cursor shape and visibility is implemented using direct
CRTC commands. Depending on the degree of register-level compatibility of
the video adapter, commands may be sent as a 16-bit (i.e., single double-
byte) value, or as two sequential 8-bit (single byte) values. The 16-bit
commands, also used by other programs, Microsoft WINDOWS), are faster but
may not work properly with some old clone systems.
This switch verifies if 16-bit (double-byte) size commands can be sent to
the video hardware to position the cursor; if so, the cursor is displayed
at the center of the screen. Otherwise, a special revision of CPx (using
8-bit size commands) is required. Most video adapters are able to handle
16-bit size commands.
SWITCH /AC
~~~~~~~~~~
Video acceleration compensation. Specify AC when installing if a memory-
resident speeding DOS video output (StdOut) were also in use, to avoid an
occasionally orphaned pseudocursor block. This switch increases the size
of the resident by only 100 bytes, and typically needs to be used only if
StdOut-mediated screen scrolling were faster than 3 milliseconds per (80-
character) line. It is ignored after the resident has been installed.
Default: /A = /AC.
SWITCH BL[±]
~~~~~~~~~~~~
This switch toggles the display of the non-blinking cursor.
/BL+ Disables the pseudocursor display. The status of modulation
of shape and visibility are unchanged. (This is the default
condition if a BL switch argument were not specified.)
/BL- Displays the non-blinking, see-through, full-block cursor at
the same screen position of the hardware cursor. The pseudo-
cursor overlays the normal cursor without changing it; to do
so, you must also specify switch SX, to change cursor shape,
or switch VU-, to make invisible.
Defaults: /B = /BL = /BL+; no switch on installation: /BL+.
SWITCH EV
~~~~~~~~~
When the *initial* copy of COMMAND.COM is loaded at boot time, it creates
a block of memory that will contain the master or global DOS environment.
The environment of DOS consists of a number of text-based variables, each
variable consisting of a name and an associated string having the format:
VARIABLE=string of characters
in which the end of the string is marked by a zero byte. The environment
contains a series of such variables, and the end of the environment block
itself is indicated by an additional zero byte. These variables are used
to pass information to and from COMMAND.COM (or a DOS shell replacement),
batch files, and application programs, such as the PATH= and the COMSPEC=
variables.
Switch EV creates or, if it already exists, updates the environment block
variable:
CPX=/SWITCH1/SWITCH2 ... /SWITCHn
where /SWITCH1.../SWITCHn are the command switches to be implemented when
the program is executed from the DOS command line or a batch file without
any argument. Although the switch itself is incorporated in the variable
as well, it is ignored when such variable is used to provide input to the
program. (See 'ENVIRONMENT VARIABLE CPX' for more details.)
Default: /E = /EV.
SWITCH HK[±?xn]
~~~~~~~~~~~~~~~
The program uses a hotkey to toggle its resident on and off. The default
hotkey combination is <Ctrl-Alt><C>, but it can be changed via switch HK
in the case of a key-assignment conflict. The hotkey is erased from the
keyboard buffer so it is not displayed (however, programs executed after
the resident is loaded could save the hotkey).
/HK+ Enables hotkey operation (this is the default condition
if an HK switch argument is not specified).
/HK- Disables hotkey operation; can be re-enabled with /HK+.
/HK? Displays the current hotkey, permitting the interactive
selection of a new hotkey including an alphanumeric key
and one or more of the shift keys <Ctrl>, <Alt>, <left-
Shift>, and <right-Shift>.
/HKxn Selects {xn} as the hotkey combination, in which {x} is
a alphanumeric character (0-9 and A-Z) only, and {n} is
a digit between 4 and 15 only. Such a digit corresponds
to one of the following shifting keys or their sum:
1 = <right-Shift> --------------------------
2 = <left-Shift> Values higher than 15 or
4 = <Ctrl> lower than 4 are invalid
8 = <Alt> --------------------------
For obvious reasons, <Ctrl> or <Alt>, or both, must be part of a new hot-
key combination either in switch /K? or /Kxn. If a hotkey other than the
default combination is needed routinely, it may be useful to store in the
DOS environment the variable 'CPX=/HKxn' (see below).
Defaults: /H = /HK = /HK+; no switch on installation = /HK+ /HKC8.
SWITCH LH[n]
~~~~~~~~~~~~
Loads the resident in the Upper Memory Area (UMA), between addresses 640
KB and 1,024 KB of memory; this is the region below the 1-MB boundary of
the memory accessible by DOS, but above the 640-KB IBM hardware barrier.
Switch LH requires an available upper memory block (UMB) of about 0.5 KB
which is allocated by the program itself either via a direct XMS request
or, if MS-DOS controls the UMB allocation (i.e. DOS 5+ linked to the UMA
through the command <dos=umb> in the CONFIG.SYS file), via calls to DOS.
The UMB selfloading has advantages over XMM- or DOS-mediated UMB loading
(see 'INSTALLATION IN UPPER MEMORY' below).
UMBs allocation requires the presence of an XMS manager (XMM) supporting
the UMB services 10h-11h of XMS 2+, and (if the XMM lacks the capability
of remapping memory) the presence of a 386-specific (V86) UMB provider.
A lower upper-memory limit for the UMB loading can also be requested via
switch LHn, in which {n} is a four-digit hexadecimal number between A000
(640 KB) and FF00 (1,020 KB), in order to avoid or select specific areas
of upper memory.
Defaults: Low-memory installation if any error is found during the UMB
loading; high-memory installation below lower-address limit if UMBs are
not available above such limit; /L = /LH.
SWITCH /SX[±te]
~~~~~~~~~~~~~~~
Cursor special effects. This switch controls the modulation of the shape
of the cursor (except its visibility).
/SX+ Enables shape modulation control. (This is the default
condition if an SX switch argument were not specified.)
/SX- Disables shape modulation; can be re-enabled with /SX+.
/SXte Selects the top {t} and end {e} line of the cursor (see
above). The lines can be selected automatically in the
Usage panel. Each line is specified as a letter in the
range <a-p> (VGA) through <a-i> (CGA).
Defaults: /S = /SX = /SX+; no switch on installation = /SX+.
SWITCH /QU
~~~~~~~~~~
If loaded, the resident becomes quiescent until the next execution of the
program, except if switch /QU, /?H, or /? were specified at such time.
Default: /Q = /QU.
SWITCH /UL
~~~~~~~~~~
Uninstalls the resident code from memory. This request is disregarded if
the address of any of the interrupts intercepted by the resident has been
modified since the program was installed, since the revectoring indicates
another resident has subsequently hooked the same interrupt(s). Thus, the
program cannot be uninstalled, because this would leave such interrupt(s)
pointing to empty memory, and the system would then crash.
The program should be uninstalled only if it is the last resident to have
been installed. In practice, however, it can also be uninstalled when any
subsequently installed resident intercepts different interrupts; although
this increases fragmentation of memory, the resulting "hole" is innocuous
and can be used by DOS for other purposes (e.g., an environment block).
Default: /U = /UL.
SWITCH VU[±]
~~~~~~~~~~~~
This switch toggles the display of the blinking cursor without disturbing
the status of cursor-shape modulation.
/VU+ Enables display of the blinking cursor. (This is the default
condition if a VU switch argument were not specified.)
/VU- Disables the display of the blinking cursor (it may not work
with some old EGA adapters); can be re-enabled with VU+.
Defaults: /V = /VU = /VU+; no switch on installation: /VU+.
COMMENTS
The comments may be added in the command line after the desired switches
and must be preceded by a semicolon. Such comments, which may be useful
in clarifying batch files, are ignored by the program.
Do not use the redirection and pipe characters in the comments since DOS
will attempt to implement the implied redirection or pipe request.
STATUS/USAGE/HELP PANELS
Executing the program with switch /? selected allows access to the Status/
Usage and Help panels. (If a Mouse pointing device driver, compatible with
the Microsoft Mouse driver version 6.0 or higher is loaded and active, all
of the services provided by these panels can also be activated by pointing
the mouse to specific areas of the screen and clicking either button. The
mouse driver state is saved prior to the display, to be restored later, if
sufficient memory is available for the panel display.)
The STATUS/USAGE panel, which is shown first, describes status information
for the resident. The status of switches /BL, /SX, and /VU is shown in the
respective, small screen buttons with the same first letter; pressing keys
<B>, <S>, or <V>, or clicking these screen buttons with mouse, toggles the
on/off status of these switches. Pressing the keypad cursor keys (<Home>,
<End>, <PgUp>, <PgDn>, <Up>, <Dn>, or keypad center <5>), or clicking-and-
dragging with the mouse over the cursor matrix subpanel, changes the scan
lines of the cursor. An asterisk is displayed before the current top/end
line selection if the current video font (e.g., screen rows displayed) is
different from that stored in the resident.
Press key <F7>, or <X>, or click the mouse upon the screen button labelled
<Exit> to return to the DOS-prompt command line.
The HELP panel provides a summary description of the program and commands,
and is displayed if key <F1> or <H> is pressed from the Status/Usage panel
(or if the mouse is clicked upon the screen button labelled <Help>). Press
the keypad cursor keys (Home/End, PgUp/PgDn, arrows) to scroll the display
down or up or the key <S> to scroll in a closed loop; alternatively, click
the mouse upon the Up/Down arrows at the top right corner of the screen to
scroll. Press key <F1> to skip the brief program summary and position the
text on the Usage section directly.
The scrolling rate can be modified by positioning the mouse over a beating
icon that becomes visible on the top line of the HELP panel when the mouse
driver is installed, and clicking the left (+) or right (-) mouse buttons.
(The beating icon is also displayed in the STATUS/USAGE panel.)
Press key <Esc> or <F2>, or click the mouse upon the rightmost icon at the
top left corner of the screen, to return to the Status/Usage panel. Press
key <F7> or <X>, or click the mouse upon the leftmost icon, to exit to the
DOS-prompt command line.
The <NumLock> key is clamped off during keyboard input to avoid conflicts.
Pressing <Esc> quits the display and returns to DOS, without modifying the
status of the program, whereas pressing <Enter> loads the resident (if not
installed) or updates it with the selected values and switch conditions.
THE ENVIRONMENT VARIABLE CPX
When the program is executed from the command line of DOS or a batch file
without an argument, it searches the DOS environment block for a variable
named 'CPX' having the format:
CPX=/SWITCH1/SWITCH2 .... /SWITCHn
Up to 128 characters are allowed after the equal sign. This string can be
incorporated to the environment block via the 'SET' command of DOS or via
switch /EV of this program (see above).
The variable can be used to specify a default configuration, which can be
restored by executing the program with null arguments after any temporary
change of parameters.
While the SET command modifies the current DOS environment block, whether
it is the global or a local one, switch /E only modifies the global block
(even when the program is executed via a secondary COMMAND.COM, as in the
case of shelling out to DOS from an application). Notice that the local
environment block is only a copy of the global block and lacks sufficient
room to increase significantly the length of a variable, and that changes
made to a local environment are not inherited by the global one.
When searching for the environment variable, the program uses the current
DOS environment block, whether it is the global or a local one.
5. INSTALLATION IN UPPER MEMORY
This section describes in more detail aspects of the active (i.e., self-
loading) or passive (e.g. via DOS LOADHIGH) installation of the resident
in the upper memory region.
DIRECT UPPER-MEMORY AREA LOADING
The utility can self-install the resident in the upper memory area (UMA),
that is, RAM addresses between 640 KB and 1,024 KB, via switch LH (or its
subfunction LHn).
The allocation of UMA blocks (UMBs) is arbitrated by an XMS manager (XMM)
version 2.0 or higher; the XMM must be installed prior to the UMB-loading
of the resident. Allocation also requires the remapping of UMA addresses
by a UMB provider, when such a task is not implemented by the XMM itself.
The XMM HIMEM.SYS and the UMB-provider EMM386.EXE are distributed with MS
DOS 5+. The allocation of UMBs is controlled by DOS when these 2 drivers
are installed, and the command <dos=umb> is added to the CONFIG.SYS file.
With DR-DOS 6+, UMB remapping and XMS support are provided by EMM386.SYS.
Other 386-specific memory managers, of course, also provide UMB remapping
and XMS support. All XMMs require MS-DOS version 3 or later.
Switch LHn, where A000 ≤ n ≤ FFFF (hexadecimal), allows the specification
of a minimum upper-memory limit for the UMB to avoid UMA regions having a
very slow access time (or to preserve regions with a fast access time for
other utilities that require faster times, such as a disk cache or screen
accelerator), or to avoid fragmentation of the UMA when UMB allocation is
not controlled by MS-DOS 5+, but by the XMM itself. The fragmentation may
occur when the XMM allocates blocks on a first-fit basis, i.e., the first
available UMB having the lowest UMA address is allocated, irrespective of
whether or not a (smaller) block matching the requested size is available
at a higher UMA address. Unless the size of the available UMBs increases
with increasing memory address, first-fit allocation of a small UMB leads
to the breaking of large UMA blocks into smaller ones, thus hampering the
UMB installation of larger residents.
If MS-DOS 5+ controls UMB allocation, the program enforces the allocation
of the resident block on a best-fit basis when {n} is not specified, that
is, all available blocks are searched (by DOS), and the one matching most
closely the size requested is allocated.
When DOS controls UMB allocation and {n} is specified, UMBs are allocated
on a first-fit basis. While this may contribute to UMA fragmentation, it
allows for the checking of a minimum memory limit in those cases in which
the selection or avoidance of a specific UMA region is more important.
Hence, compared to the upper-memory loading provided by the LH command of
MS-DOS 5+, the HILOAD command of DR-DOS 5+, or a similar service provided
by other memory managers, self-loading into a UMB has several advantages,
including: (1) it does not require an initial free UMB of the size of the
entire program (as opposed to the size of its resident only), (2) it does
allow user control on the selection of the upper-memory block, and (3) it
can help reduce UMA fragmentation.
NOTE -------------------------------------------------------------------
The address and size of available UMBs can be obtained with MEM.EXE
(when DOS controls UMB allocation) or via the memory manager itself
(when the allocation is controlled by 386-specific memory managers.
In either case, such data can also be obtained with UMAX.EXE, a UMA
mapping utility that is distributed by the author.
-------------------------------------------------------------------
UMA LOADING VIA MEMORY MANAGERS, DR-DOS 5+, or MS-DOS 5+
The resident can also be installed in the UMA via a 386-memory manager or
DR-DOS 5+/MS-DOS 5+ commands (e.g., HILOAD, LH, etc), provided that there
is a sufficiently large, free UMB for the actual size of the entire file,
and any for additional memory that may be required by the loading service
itself.
Please note that, to minimize disk storage, the program is distributed as
a compressed EXE file that expands on execution by a factor of 2 or less.
Thus, the difference between the actual size upon loading and the nominal
directory size may create conflicts with UMA-loading services that do not
measure actual size: If the available upper memory were smaller than that
required by the decompressed file but larger than the nominal (directory)
size, such service would attempt to load the compressed file. Of course,
the subsequent file decompression would overwrite the adjacent memory and
likely crash the memory manager or DOS!
When attempting to load the resident in a UMB via a memory manager or DOS
5+, do NOT request in the same command line switches that result in panel
displays. These displays require an additional 8,000 bytes of *adjacent*
free memory, and the free-RAM measuring procedure used by the program can
be negated by UMA-loading services that do not update the program segment
prefix (PSP) of the program being loaded. Such switches are /?, /?H, and
/HK?.
UMA UPDATING
When the program has been installed in upper memory, it does not require
a high-memory loading utility to update its resident and all updates can
be made via program executions from the DOS-command line. This obviates
the restriction (of some memory systems) of having to maintain a pool of
of free upper memory simply to load the entire program to update a small
resident.
UMA DEALLOCATION
When resident deallocation is requested (switch UL) from the DOS command
line (as opposed to via upper-memory loading utilities), the resident is
removed from memory even when it was loaded in the UMA.
When switch UL is requested via a high-memory utility be aware that some
of these utilities warn that a "resident installation has failed." This
warning is harmless and may be ignored.
IDENTIFICATION IN MEMORY MAPS
If the resident has been loaded in lower conventional memory, the program
can be identified by name in usage maps yielded by various memory mapping
utilities. Although the program sheds its own copy of the environment at
installation time (to minimize the resident size), the name
CPx n.nn.n
will appear in the command line listing for the resident, irrespective of
the actual content of the DOS command line at the time of loading; n.nn.n
are the major and minor program version, and the revision number.
However, when UMB loading is mediated by the XMS directly (e.g., extended
memory manager and DOS versions 2-4, or MS-DOS 5+ not linked to the upper
memory) and the resident is selfloaded via switch LH, many memory mapping
programs do not list the allocated block, or lump it with other allocated
blocks, or fail to reveal the name of the resident.
If the UMB allocation is controlled by MS-DOS 5+, the UMB resident can be
identified with some mapping utilities (e.g., MEM.EXE of MS-DOS) although
it is listed as "Data" instead of "Program."
6. TECHNICAL INFORMATION
INTERRUPTS
Whenever certain conditions occur, either within a program or the system,
it becomes necessary for the processor to interrupt its current operation
and execute one of a group of special routines. The action that triggers
the execution of such a routine is referred to as an interrupt; there are
internal interrupts, in response to a state of the CPU or an instruction,
and external interrupts, caused by signals sent to the CPU from elsewhere
in the system.
When the program is waiting for keyboard (or mouse) user input during its
Status/Usage/Help display, it invokes repeatedly the 'idle' interrupts of
DOS: INT 28h and, if running under MS-DOS 5+, function 1680h of INT 2Fh,
if this function indicates that it can process program suspension.
INT 28h permits potential background activation of (some) other residents
while INT 2Fh/1680h permits MS-DOS 5+ to suspend the program temporarily,
and transfer control to another program.
The program also intercepts several interrupts,
INT 08h - Timer hardware
INT 09h - Keyboard hardware
INT 10h - BIOS video services
INT 21h - DOS system services
INT 2Fh - DOS multiplex services
Interrupt 8h (system timer)
Channel 0 of the 8253/8254 timer chip produces a hardware interrupt (IRQ0),
interrupt 8h, about 18.2 times a second that is used by the system time-of-
day clock. The interrupt is used to enforce the selected cursor shape when
the InDOS flag of DOS indicates that the system can be interrupted safely.
Interrupt 9h (keyboard hardware)
This interrupt is generated whenever a key is either depressed or released.
It is used by the resident to monitor if its hotkey has been pressed (so as
to toggle all cursor services ON or OFF), and by the pseudocursor option if
an extended key (i.e., keypad cursor key) is pressed.
Interrupt 10h (BIOS video)
This interrupt is used to invoke a number of ROM BIOS video services and it
is used by the pseudocursor option when it is necessary to move the pseudo-
cursor from its present position.
Interrupt 11h (BIOS equipment configuration)
This interrupt is used to provide a 32-bit value with data on the equipment
configuration. It is used by the program to determine whether its resident
is alredy installed.
Interrupt 21h (DOS dispatcher services)
This interrupt is used to mediate the display of DOS output to the console.
It is used by the program only if switch AC were specified at installation.
Interrupt 28h (DOS idle loop)
This interrupt is generated from a "get keyboard input" routine in DOS when
it is safe to access some DOS services and to interrupt DOS itself, even if
the InDOS flag signals a busy status. This interrupt is used to enforce of
the selected cursor shape at the DOS prompt level when the InDOS flag gives
a DOS-busy signal.
Interrupt 2Fh (DOS multiplex services)
This interrupt is used to provide a motley of services for MS-DOS, WINDOWS,
and third-party applications. CPx monitors this interrupt for the so-called
initialization and exit broadcasts of WINDOWS 3.x (386-Enhanced or Standard
mode).
DOS ERRORLEVELS
Upon completion, the program passes an errorlevel value which can be used
to check (via ERRORLEVEL commands in a batch file) the outcome of program
execution. The following errorlevels may be passed:
Value Nature of Error
----- ------------------------------------
255 Cyclical redundancy check failure
255 CPU type cannot execute 286+ version
255 DOS version 1 encountered
128 Insufficient memory for display processing
64 XMM not installed/XMS error in UMB load
32 Error updating environment variable
16 Invalid hotkey combination
8 Unknown video adapter/Bad CRTC
4 Unable to uninstall resident
2 Invalid switch request
1 User <CTRL-BREAK> keypress
0 Successful execution
Some conditions generating errorlevels 1 through 128 may be additive, and
the resulting error value may represent more than a single error.
7. OPERATION REQUIREMENTS & CONFLICTS
The resident will fail to operate properly when access to some interrupts
(see above) is denied by an ill-behaved foreground application or another
resident loaded after CPx.
WINDOWS 3.X
To avoid conflicts, CPx becomes inactive under Microsft WINDOWS 3.X (386-
Enhanced and Standard mode), active when WINDOWS ends. For other WINDOWS
modes or versions, use the following batch file:
@Echo Off
...
[path]CPX /Q ; inactivate resident
[path]WIN ; run Windows
[path]CPX ; reactivate resident
...
PSEUDOCURSOR LIMITATIONS
The psudocursor can be used at the level of the DOS command line (prompt).
With video accelerators which increase the DOS video output, a few pseudo-
cursor blocks might remain on the screen when such an acceleration is very
fast; this is restricted to the 'StdOut' DOS video output, and is not seen
when only video BIOS acceleration is used. This problem can be avoided by
specifying switch AC before installing the resident.
With some (text-mode) text editors, the pseudocursor may fail to appear in
the top line when scrolling the screen downwards ( or PgDn key) or in the
bottom line when the screen scrolling upwards ( or PgUp key). The cursor
reappears immediately after any alphanumeric or cursor key is pressed.
8. COPYRIGHT & LICENSE INFORMATION
This documentation, programs, and other files distributed in this software
package (the "Software") are the copyrighted property of FM de Monasterio
(the "Author"), who provides the Software and licenses its use. All rights
are reserved.
The Software is not sold. A license fee is required to use this Software.
This license does not transfer to you either the ownership of or the title
to the Software, which remain the property of the Author. A form required
to license the Software is provided in the enclosed file CPX.REG.
SINGLE USER LICENSE. Grants you use of this Software in a single computer
at a time; the Software may be transferred to another computer, as long as
it is used only in 1 computer at any time; under the license, the Software
may NOT be installed on a network server.
SITE/15-PCs LICENSE. Grants you use of this Software in a sigle site or a
set of sites, as long as the Software is not used in more than 15 machines
at a time, and that such machines are located exclusively within the site.
Licenses for more machines are available at discounted prices.
SOFTWARE BUNDLING LICENSE. Please write to the Author.
REFUNDS POLICY. If a problem notified within ninety (90) days of shipping
of the registered copy cannot be solved, the registration fee (but not the
shipping costs) will be refunded upon receiving a written request with the
original diskette(s) enclosed.
UPGRADE POLICY. Program upgrades are limited to licensed users. Upgrades
within the same major version (e.g. release 4.00 through 4.99) are free of
charge when a self-addressed, stamped, 5.25" diskette mailer with a 360-KB
diskette is included with the request. Other upgrades are charged half the
(single-user/site) registration fee. See the enclosed file CPX.UPG.
U.S. GOVERNMENT INFORMATION
The Software is Commercial Computer Software under the Federal Acquisition
Regulations of the U.S. government and the Agency Supplements to them. The
Software is provided to the Federal Government and its agencies only under
the Restricted Rights Provisions of the above noted regulations applicable
to commercial software developed at private expense, and not in the public
domain. The use, duplication, or disclosure of the Software by the Federal
Government or its agencies is subject to the restrictions set forth in the
subdivision (c.1.ii) of the Rights in Technical Data and Computer Software
clause at DFARS 252.227-7013 (October 1988) and FAR 52.227-19 (June 1987).
9. DISTRIBUTION
You may distribute the Software, but you are specifically prohibited from:
- Charging fees or asking donations in exchange of or payment
for copies of this Software.
- Distributing this Software with commercial products without
the written, express permission in advance from the author.
- Distributing this Software via a for-profit organization or
group, either alone or with other software.
- Changing any of the contents of this Software including the
copyright notice and license information.
You may not disassemble or otherwise reverse engineer the Software. Other
uses of the Software are prohibited without a written authorization signed
by the Author.
Latest program releases may be found at the Information Exchange BBS (703)
836-0748, as a compressed archive file.
WARRANTY DISCLAIMER FOR UNREGISTERED COPIES
The information contained in the documentation for the Software is subject
to change without notice.
The Author cannot and does not warrant that any functions contained in the
Software will meet your requirements, or that its operations will be error
free. The entire risk as to the Software performance or quality, or both,
is solely with the user and not the Author. You assume responsibility for
the selection of the Software to achieve your intended results and for the
installation, use, and results obtained from the Software.
The Author makes no warranty, either implied or expressed, including with-
out limitation any warranty with respect to this Software documented here,
its quality, performance, or fitness for a particular purpose. In no event
shall the Author be liable to you for damages, whether direct or indirect,
incidental, special, or consequential arising out the use of or any defect
in the Software, even if the Author has been advised of the possibility of
such damages, or for any claim by any other party.
All other warranties of any kind, either express or implied, including but
not limited to the implied warranties of merchantability and fitness for a
particular purpose, are expressly excluded.
By using the Software, you acknowledge (1) to have read and understood all
parts of this document and (2) to have agreed with and accepted all of its
terms and provisions without any reservation.
For information on the terms of the Limited Warranty for licensed Software
copies or any other information on this program, please write to:
FM de Monasterio
P.O. Box 219
Cabin John, MD 20818-0219
USA
┌─────────────────────────────────────────────────────────────┐
│ Trademarked names are the property of the respective owners │
└─────────────────────────────────────────────────────────────┘
[End]